<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
			<style>
		    #layerzuo{
		     width:600px;
		     height:300px;
		     background:#ccc;
		     border:1px solid #aaa;
		     position:fixed;
		     _position:absolute;    
		     top:50%;
		     right:50%;
		     margin:-150px -300px 0 0;
		     display:none;   
		 }
		 #closezuo{
		     position:absolute;
		     top:0;
		     right:0;
		     font:20px/1 Arial;
		     text-decoration:none;
		 }
		 #progress{
		     position:absolute;
		     border:1px;
		     solid #ccc;
		     width:570px;
		     top:40px;
		     left:10px;
		 }
		 
		 #information {
		     position:absolute;
		     top:15px;
		     left:10px;
		 }
		 #importmsg {
		     position:absolute;
		     top:70px;
		     left:15px;
		     text-align:left
		 }
		</style>
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./assets/scripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<link type="text/css" href="./assets/styles/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript">
		$(function() {
			//$('.message').fadeIn("slow");
			$('#closezuo').click(function(){
				document.getElementById("information").innerHTML="";
				document.getElementById("importmsg").innerHTML="";
				document.getElementById("progress").innerHTML="処理結果ここで表示";
				$('#layerzuo').fadeOut();}
			);
			$('#btn-import').click(function(){	
				$('#layerzuo').fadeIn()
				document.fm.action = "user_importing.php";
				document.fm.target = "i_frame";
				document.fm.submit();
				/*
				var winstyle = "width=600,height=300,status=no,toolbar=no,menubar=no,location=no,scrollbars=no";
				win=window.open("about:blank","winprocess",winstyle);
				//win = showDialog("about:blank", null, {width:'300px', height:'200px', dependent:true});
				document.fm.target = "winprocess";
				*/
				
				/*
				$(this).attr('action','testflush.php')
				$.ajax({ // create an AJAX call...
			        data: $(this).serialize(), // get the form data
			        type: $(this).attr('method'), // GET or POST
			        url: $(this).attr('action'), // the file to call
			        success: function(response) { // on success..
			            $('#layer').html(response); // update the DIV
			         }
			        });
				*/
			});
		});

		</script>
	
	</head>
	<body id="">
{{ $menu }}
{{ $logout }}

		<div id="container"><div class="wrapper">
			<h2>ログインマスター管理</h2>
			<ul class="submenu clearfix">
				<li><a href="user_index.php">ユーザー情報一覧</a></li>
				<li><a href="user_form.php">ユーザー情報登録</a></li>
				<li>CSV更新</li>
			</ul>
			<h3>CSV更新</h3>

			<p class="message">更新用CSVファイルの送信</p>
			<form  id="fmfile" name="fm" method="post"  enctype="multipart/form-data" >
				<table class="formTable">
					<tbody>
						<tr>
							<th>ファイル</th>
							<td>
								<input class="fileup" type="file" name="upfile" size="90" > <p class="error">{{ $err.file }}</p> 
								<input type="hidden" name="isfilesubmit"  value = "1"/>
							</td>
						</tr>
					</tbody>
				</table>
				<p class="button">
					<button type="button" id="btn-import" class="submit"><span>アップロード</span></button>
				</p>
			</form>
		</div>
		</div>
		<div id='i_frame_div'><iframe id='i_frame' name='i_frame' ></iframe></div>
		<div id="layerzuo" >
			<a href="javascript:void(0)" title="关闭" id="closezuo">X</a>
	     	<!-- Progress bar holder -->
			<div id="progress"></div>
			<!-- Progress information -->
			<div id="information" >処理中. . .  </div> 
			<div id="importmsg" >処理結果ここで表示</div> 
		</div>
		{{ $footer }}
	</body>
</html>